package com.rchat.pocmini.activity.location;

import android.widget.AdapterView;

import com.airtalkee.sdk.entity.AirContact;
import com.aso.common.http.delegate.HttpCallbackImpl;
import com.baidu.mapapi.map.Marker;
import com.baidu.mapapi.map.MyLocationConfiguration;
import com.baidu.mapapi.map.MyLocationData;
import com.baidu.mapapi.model.LatLng;
import com.rchat.pocmini.activity.bean.ClistBean;
import com.rchat.pocmini.common.mvp.BaseModel;
import com.rchat.pocmini.common.mvp.BasePresenter;
import com.rchat.pocmini.common.mvp.BaseView;

import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by ljd on 2017/9/28.
 */

public interface LocationContract {

    interface View extends BaseView {
        void showMember(AirContact airContact);

        void showTalkIv(int resId);

        void setLocationData(MyLocationData locData);

        void setLocationConfiguration(MyLocationConfiguration configuration, LatLng latLng);

        void targetToLatLng(LatLng latLng, boolean isNeedZoom);

        void updateOverlay(List<ClistBean> list, AirContact mAirContact);

    }

    abstract class Presenter extends BasePresenter<LocationContract.View, LocationContract.Model> {
        /**
         * 进入地图要十秒上报一次位置
         */
        abstract void reqLocationReport10S();

        /**
         * 退出地图要取消十秒上报一次位置的设置，恢复为原来的状态
         */
        abstract void cancelLocationReport10S();

        abstract void reqTalk();

        abstract void reqTalkRelease();

        abstract void initOrientationListener();

        abstract void reqOtherLocation();

        abstract void oriLocation();

        abstract void startNavigation(Marker startMarker, Marker endMarker);

        abstract void showMemberDetailDialog(Marker marker, List<AirContact> memberList, Marker startMarker);

        abstract void horizonListOnItemClick(AdapterView<?> parent, android.view.View view, int position, long id, ConcurrentHashMap<String, Marker> markers);
    }

    interface Model extends BaseModel {
        /**
         * 获取频道成员位置
         *
         * @param userName
         * @param groupId
         * @param callback
         */
        void reqOtherLocation(String userName, String groupId, HttpCallbackImpl callback);
    }
}
